From e0a9d02b52d13d4ac1ffb725ad66aa61fb41fca0 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Thu, 13 Nov 2025 01:13:51 +0100 Subject: [PATCH] dhcpv6: DHCPV6_OPT_INFO_REFRESH contains a 4 byte option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit we shall not expect data beyond 4 bytes. So the logic should be == Signed-off-by: Paul Donald Link: https://github.com/openwrt/odhcp6c/pull/118 Signed-off-by: Álvaro Fernández Rojas --- src/dhcpv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index e5ef5cc..7bcaee0 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -1475,7 +1475,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _o_unused const int rc, break; case DHCPV6_OPT_INFO_REFRESH: - if (olen >= 4) + if (olen == 4) refresh = ntohl_unaligned(odata); break; -- 2.30.2